package tr.edu.metu.is.mega.client.service;

import java.util.List;

import tr.edu.metu.is.mega.common.dto.CourseDTO;
import tr.edu.metu.is.mega.common.dto.CourseStudentDTO;
import tr.edu.metu.is.mega.common.dto.TeamDTO;

import com.google.gwt.user.client.rpc.AsyncCallback;

/**
 * Asynch interface of {@link GwtCourseService}.
 */
public interface GwtCourseServiceAsync {

    /**
     * @see GwtCourseService#createCourse(CourseDTO)
     */
    void createCourse(CourseDTO course, AsyncCallback<CourseDTO> callback);

    /**
     * @see GwtCourseService#updateCourse(CourseDTO)
     */
    void updateCourse(CourseDTO course, AsyncCallback<CourseDTO> callback);

    /**
     * @see GwtCourseService#deleteCourse(CourseDTO)
     */
    void deleteCourse(CourseDTO course, AsyncCallback<Void> callback);

    /**
     * @see GwtCourseService#getCourses(CourseDTO)
     */
    void getCourses(CourseDTO filter, AsyncCallback<List<CourseDTO>> callback);

    void updateTeam(TeamDTO team, AsyncCallback<CourseDTO> callback);

    void exportToGoogleCalendar(String userName, String password, CourseDTO course, AsyncCallback<Boolean> callback);

    void pullStudentsFromMETUOnline(CourseDTO course, AsyncCallback<List<CourseStudentDTO>> callback);

}
